package com.qf.medical.response;

import lombok.Getter;

/**
 * 登录
 * 1.  1 账号不存在  2 账号被警用   3 密码错误  4 登录失败
 * 400001
 */
@Getter
public enum ResponseCode {
    SUCCESS(200, "success"),
    /**
     *
     */
    SYS_ERROR(404, "系统错误"),
    /**
     *
     */
    USER_LOGIN_ERROR(400001, "用户登录失败"),
    /**
     *
     */
    USER_EXIST_ERROR(400002, "用户已存在"),
    /**
     *
     */
    USER_REGISTER_SUCCESS(40003, "注册成功"),
    /**
     *
     */
    USER_REGISTER_ERROR(40004, "注册失败"),


    /**
     * 患者
     */
    OUTPATIENT_NULL_ERROR(2001, "门诊信息查询为空"),
    PATIENT_ADD_ERROR(2002, "患者信息添加失败"),
    PATIENT_DELETE_ERROR(2009, "患者删除失败"),
    PATIENT_UPDATE_ERROR(2005, "患者信息更新失败"),
    PATIENT_NULL_ERROR(2007, "患者信息不存在"),
    PATIENT_STATE_ERROR(2019, "患者账号异常"),
    PATIENT_IS_HAVE(2024, "患者身份证或电话号码已存在"),

    /**
     * 就诊卡
     */
    PATIENT_CARD_SELECT_ERROR(2040, "就诊卡查询失败"),


    /**
     * 订单
     */
    INDENT_ADD_ERROR(2003, "订单信息添加失败"),
    INDENT_DELETE_ERROR(2004, "订单信息删除失败"),
    INDENT_UPDATE_ERROR(2006, "订单信息更新失败"),
    INDENT_SELECT_ERROR(2008, "订单信息查询失败"),
    INDENT_AMOUNT_ERROR(2025, "订单金额有误"),


    /**
     * 就诊
     */
    TREATMENT_SELECT_ERROR(2010, "就诊信息查询失败"),
    TREATMENT_ADD_ERROR(2011, "就诊信息添加失败"),
    TREATMENT_UPDATE_ERROR(2012, "就诊信息修改失败"),
    TREATMENT_DELETE_ERROR(2013, "就诊信息删除失败"),

    /**
     * 住院
     */
    HOSPITALIZED_SELECT_ERROR(2020,"住院信息查询失败"),
    HOSPITALIZED__ADD_ERROR(2021,"住院信息添加失败"),
    HOSPITALIZED_UPDATE_ERROR(2022,"住院信息修改失败"),
    HOSPITALIZED_DELETE_ERROR(2023,"住院信息删除失败"),

    /**
     * 充值
     */
    RECHARGE_SELECT_ERROR(2014, "充值记录查询失败"),
    RECHARGE_ADD_ERROR(2015, "充值记录添加失败"),
    RECHARGE_UPDATE_ERROR(2016, "充值记录修改失败"),
    RECHARGE_DELETE_ERROR(2017, "充值记录删除失败"),
    BALANCE_UPDATE_ERROR(2018, "余额修改失败"),
    RECHARGE_AMOUNT_ERROR(2027, "充值金额有误"),


    /**
     * 物流
     */
    LOGISTICS_ADD_ERROR(2030,"物流信息添加失败"),
    LOGISTICS_SELECT_ERROR(2031,"物流信息查询失败"),
    LOGISTICS_UPDATE_ERROR(2032,"物流信息修改失败"),
    LOGISTICS_DELETE_ERROR(2033,"物流信息删除失败"),
    LOGISTICS_DETAIL_SELECT_ERROR(2034,"物流详情查询失败"),

    /**
     * 病历
     */
    MEDICAL_RECORD_SELECT_ERROR(2040,"病历信息查询失败"),
    MEDICAL_RECORD_ADD_ERROR(2041,"病历信息添加失败"),
    MEDICAL_RECORD_DELETE_ERROR(2042,"病历信息删除失败"),
    MEDICAL_RECORD_UPDATE_ERROR(2043,"病历信息修改失败"),





    /**
     * 医院管理
     */
    HOSPITAL_NOT_EXIST_ERROR(4000, "医院信息不存在"),
    HOSPITAL_EXIST_ERROR(4001, "医院信息已存在"),
    VISIT_GUIDE_NOT_EXIST_ERROR(4002, "就诊指南不存在"),
    VISIT_GUIDE_EXIST_ERROR(4003, "就诊指南已存在"),
    HEALTHY_ESSAY_NOT_EXIST_ERROR(4004, "健康百科不存在"),
    HEALTHY_ESSAY_EXIST_ERROR(4005, "健康百科已存在"),
    COMBO_TYPE_NOT_EXIST_ERROR(4006, "套餐类型信息不存在"),
    COMBO_TYPE_EXIST_ERROR(4007, "套餐类型信息已存在"),
    PROJECT_EXIST_ERROR(4008, "项目信息已存在"),
    PROJECT_NOT_EXIT_ERROR(4009, "项目信息不存在"),

    COMBO_NOT_EXIT_ERROR(4010,"套餐信息不存在"),
    COMBO_EXIT_ERROR(4011,"套餐信息已存在"),
    DEPARTMENT_EXIT_ERROR(4012,"科室信息已存在"),
    DEPARTMENT_NOT_EXIT_ERROR(4013,"科室信息不存在"),
    DOCTOR_INFO_EXIT(4014,"医生信息已存在"),
    DOCTOR_INFO_NOT_EXIT(4015,"医生信息不存在"),
    DOCTOR_INFO_UPDATE_SUCCESS(4016,"医生信息修改成功"),
    DOCTOR_INFO_UPDATE_ERROR(4017,"医生信息修改失败"),


    /**
     * 角色 1001-1020
     */
    ROLE_IS_HAVE(1001, "角色已存在"),
    ROLE_ADD_SUCCESS(1002, "角色添加成功"),
    ROLE_ADD_ERROR(1003, "添加角色失败"),
    ROLE_MOD_STATUS_SUCCESS(1004, "切换状态成功"),
    ROLE_MOD_STATUS_ERROR(1005, "切换状态失败"),
    ROLE_MOD_ROLE_SUCCESS(1006, "修改角色成功"),
    ROLE_MOD_ROLE_ERROR(1007, "修改角色失败"),
    ROLE_DEL_BATCH_SUCCESS(1008, "批量删除角色成功"),
    ROLE_DEL_BATCH_ERROR(1009, "批量删除角色失败"),
    ROLE_DEL_SUCCESS(1010, "删除角色成功"),
    ROLE_DEL_ERROR(1011, "删除角色失败"),
    ROLE_FIND_ERROR(1012,"没有这个角色"),

    /**
     * 管理员 1020-1040
     */
    ADMIN_USERNAME_IS_HAVE(1020, "管理员用户名已存在"),
    ADMIN_ACCOUNT_IS_HAVE(1021, "管理员账号已存在"),
    ADMIN_MOD_SUCCESS(1022, "管理员修改成功"),
    ADMIN_MOD_ERROR(1023, "管理员修改失败"),
    ADMIN_ADD_SUCCESS(1024, "管理员添加成功"),
    ADMIN_ADD_ERROR(1025, "管理员添加失败"),
    ADMIN_DEL_SUCCESS(1026, "管理员删除成功"),
    ADMIN_DEL_ERROR(1027, "管理员删除失败"),
    ADMIN_DEL_BATCH_SUCCESS(1028, "批量删除管理员成功"),
    ADMIN_DEL_BATCH_ERROR(1029, "批量删除管理员失败"),
    ADMIN_MOD_STATUS_SUCCESS(1030, "修改管理员状态成功"),
    ADMIN_MOD_STATUS_ERROR(1031, "修改管理员状态失败"),
    ADMIN_FIND_ERROR(1032,"没有这个管理员"),
    ADMIN_LOGIN_SUCCESS(1033,"管理员登陆成功"),
    ADMIN_LOGIN_ERROR(1034,"管理员登陆失败"),
    ADMIN_RE_PASSWORD_SUCCESS(1035,"管理员修改密码成功"),
    ADMIN_RE_PASSWORD_ERROR(1036,"管理员修改密码失败"),
    ADMIN_PHONE_IS_HAVE(1037,"管理员电话已存在"),
    ADMIN_LOGIN_OUT_ERROR(1038,"管理员退出登录成功"),

    /**
     * 职称 1040-1060
     */
    TITLE_IS_HAVE(1041, "职称已存在"),
    TITLE_ADD_SUCCESS(1042, "职称添加成功"),
    TITLE_ADD_ERROR(1043, "职称添加失败"),
    TITLE_MOD_SUCCESS(1044, "职称修改成功"),
    TITLE_MOD_ERROR(1045, "职称修改失败"),
    TITLE_DEL_SUCCESS(1046, "职称删除成功"),
    TITLE_DEL_ERROR(1047, "职称删除失败"),
    TITLE_DEL_BATCH_SUCCESS(1048, "职称批量删除成功"),
    TITLE_DEL_BATCH_ERROR(1049, "职称批量删除失败"),
    TITLE_MOD_STATUS_SUCCESS(1050, "职称状态修改成功"),
    TITLE_MOD_STATUS_ERROR(1051, "职称状态修改失败"),
    TITLE_FIND_ERROR(1052,"没有这个职务"),

    /**
     * 公告 1060-1080
     */
    INFORM_ADD_SUCCESS(1061,"公告添加成功"),
    INFORM_ADD_ERROR(1061,"公告添加失败"),
    INFORM_HEADLINE_IS_HAVE(1062,"公告标题已存在"),
    INFORM_MOD_SUCCESS(1063,"公告修改成功"),
    INFORM_MOD_ERROR(1064,"公告修改失败"),
    INFORM_FIND_ERROR(1065,"查询的公告不存在"),
    INFORM_DEL_SUCCESS(1066,"删除公告成功"),
    INFORM_DEL_ERROR(1067,"删除公告失败"),
    INFORM_DEL_BATCH_SUCCESS(1068,"批量删除公告成功"),
    INFORM_DEL_BATCH_ERROR(1069,"批量删除公告失败"),
    INFORM_MOD_STATUS_SUCCESS(1070,"公告状态修改成功"),
    INFORM_MOD_STATUS_ERROR(1071,"公告状态修改失败"),
    INFORM_FIND_PAGE_ERROR(1072,"查询公告失败"),

    /**
     * 预约管理 1081-1100
     */
    SUBSCRIBE_ADD_SUCCESS(1081,"提交预约挂号成功"),
    SUBSCRIBE_ADD_ERROR(1082,"提交预约挂号失败"),
    SUBSCRIBE_REMARK_UPDATE_SUCCESS(1083,"修改预约挂号备注成功"),
    SUBSCRIBE_REMARK_UPDATE_ERROR(1084,"修改预约备注挂号失败"),
    SUBSCRIBE_DEL_SUCCESS(1085,"删除预约挂号记录成功"),
    SUBSCRIBE_DEL_ERROR(1086,"删除预约挂号记录失败"),
    SUBSCRIBE_ALREADY_NOT_COUNT(1087,"该医生的预约已经满了"),

    /**
     * 返回参数自定义异常
     */
    RESPONSE_ERROR(1100, "参数错误");


    private final String msg;
    private final Integer code;

    ResponseCode(Integer code, String msg) {
        this.msg = msg;
        this.code = code;
    }
}
